/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.systemcar.dao;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import br.com.systemcar.model.Combustivel;
import java.io.Serializable;
import java.util.List;
import javax.annotation.security.PermitAll;
import javax.persistence.Query;


/**
 *
 * @author danilo
 */
@Stateless
public class CombustivelDao implements Serializable{
    @PersistenceContext(unitName="SystemcarPU")
    private EntityManager em;
    

    public List<Combustivel> listar(){
        Query query = em.createNamedQuery("Combustivel.findAll");
        List<Combustivel> lstCombustivel =query.getResultList();
        return lstCombustivel;
    }
    
    
    
}
